package com.zhledu.mongo.controller;

import com.zhledu.mongo.beans.Student;
import com.zhledu.mongo.dao.StudentRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class StudentController {

    @Autowired
    private StudentRepository studentRepository;


    public List<Student> getAllStudent(){


        return studentRepository.findAll();
    }



}
